//
// Created by root on 05/04/17.
//

#ifndef IMG_SVR_PACK_META_SVR_API_H
#define IMG_SVR_PACK_META_SVR_API_H

#include "Poco/Runnable.h"
#include "Poco/Thread.h"
#include "meta_svr_interface.h"
#include "Poco/Event.h"
#ifndef QUERY_DAYS
#define QUERY_DAYS 7
#endif
using meta_svr::MetaSvrInterface;
class PackMetaSvrApiGetRecentMeta:public Poco::Runnable {
public:
    void run();
    PackMetaSvrApiGetRecentMeta(Poco::Event& ev,std::set<meta::MetaStruct>& metas,string busi_type,string uid,bool order_asc, unsigned long limit,string staff_id);
private:
    Poco::Event &_ev;
    std::set<meta::MetaStruct>& _metas;
    string _beg_time;
    string _end_time;
    string _busi_type;
    string _uid;
    bool _order_asc;
    unsigned long _limit;
    string _staff_id;
};
class PackMetaSvrApiGetGeneralMeta:public Poco::Runnable {
public:
    void run();
    PackMetaSvrApiGetGeneralMeta(Poco::Event& ev,std::set<meta::MetaStruct>& metas,string busi_type,string uid,string beg_time,string end_time,string staff_id="dw_zhaogang1");
private:
    Poco::Event &_ev;
    std::set<meta::MetaStruct>& _metas;
    string _beg_time;
    string _end_time;
    string _busi_type;
    string _uid;
    string _staff_id;
};

#endif //IMG_SVR_PACK_META_SVR_API_H
